import {requestClient} from '#/api/request';

import type {Recordable} from '#/typings';

export async function login(params: Recordable<any>) {
    return requestClient.post('/auth/login', {}, {params});
}

export async function logout() {
    return requestClient.post('/auth/logout');
}

export async function getAuthentication() {
    return requestClient.get('/auth/authentication');
}

export async function refreshToken() {
    return requestClient.post('/auth/refresh', {
        withCredentials: true,
    });
}